// Copyright (c) 2006 Zorm
// Released under the MIT License

#ifndef WINDOW_H
#define WINDOW_H
#pragma once

class Window {

public:
	Window(HINSTANCE instance) : m_pgmInstance(instance) {}
	Window() { m_pgmInstance = 0; }
	void Show(int cmdShow = SW_SHOWNORMAL) { ShowWindow(m_windowHWND, cmdShow); }
	bool RegisterClass();
	HWND getHWND() { return m_windowHWND; }
	virtual bool CreateWindows() = 0;

protected:
	virtual LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam) = 0;
	virtual LPCTSTR ClassName() = 0;
	virtual LPCTSTR WindowName() = 0;
	
	HWND m_windowHWND;
	HINSTANCE m_pgmInstance;
	
private:
	static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);

};

#endif